home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Graphics / RTGmaster / devdocs / rtgmaster.ad < prev    next >
Text File  |  1997-09-26  |  82KB  |  2,063 lines

  1. rtgmaster.library/CallRtgC2P                                rtgmaster.library/CallRtgC2P
  2.  
  3.    NAME
  4.         CallRtgC2P -- Perform c2p for Planar Screens, CopyRtgPixelArray for Chunky Screens
  5.  
  6.    SYNOPSIS
  7.         int CallRtgC2P(RtgScreen,BufAdr,Array,signal,xpos,ypos,width,height,mode)
  8.          D0              A0        A1     A2    D0     D1   D2   D3    D4     D5
  9.  
  10.         int CallRtgC2P(struct RtgScreen *,APTR,APTR,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG)
  11.  
  12.    FUNCTION
  13.         This function will look what the "standard c2p" for the system is up to now
  14.         (the standard c2p can be choose by a future version of the Rtgmaster Screenmode
  15.         requester, the available c2p algorithms are found in libs:rtgc2p, how own c2p
  16.         algorithms can be added to the system will be explained in the documentation
  17.         of the first version of rtgmaster.library that actually supports CallRtgC2P).
  18.         The function will, if the display is a Planar one, convert the Chunky Data in
  19.         Array to Planar using the choosen c2p algorithm, and display it in the choosen
  20.         Buffer. For Chunky Displays it will instead do the same as CopyRtgChunkyPixel.
  21.         This way a very easy possibility to support both AGA and Graphics Boards without
  22.         having to do "special versions" will be available, if one uses a Fastram Buffer.
  23.  
  24.         I am still looking for c2p algorithms for this function !!! All used c2p algorithms
  25.         should support AGA and additional, it would be fine, if they supported
  26.         1x1,1x2,2x1 and 2x2. If you have fine c2p algorithms, mail me
  27.         (MagicSN@birdland.es.bawue.de).
  28.  
  29.         NOTE : The Array should EXACTLY be as big as specified with Left, Top, Width
  30.         and Height... it should *NOT* be bigger.
  31.  
  32.         NOTE: Currently you *HAVE TO* use xpos=0 ypos=0 width=<max x> height=<max y>
  33.         Maybe this will change in the future !!!!!!!!!!!!!! This is only because i do
  34.         not have ANY c2p that supports that feature up to now...
  35.  
  36.         NOTE: Some c2p algorithms might do NOTHING in certain colour depths, chunky modes
  37.         or for interleaved bitmaps. Be careful about this. If the c2p works,
  38.         this function returns 0, otherwise an errorcode.
  39.  
  40.         Principially it COULD support 256, 64 (EHB), 32 or 16 colors and 1x1, 1x2, 2x1,
  41.         2x2,4x2,2x4 and 4x4 (look at the includes). It is also possible to choose the
  42.         FASTEST AVAILABLE, the BEST AVAILABLE mode or the mode that was selected from
  43.         the user as standard mode for his system, using the Screenmode Requester.
  44.  
  45.         If the user did not specify a standard c2p, this function will use the fastest
  46.         available mode.
  47.  
  48.         The signal indicates (for asynchrone c2p) that the c2p has done. For synchrone
  49.         ones it is set after quitting the function.
  50.  
  51.         In mode you specify which c2p mode to use.
  52.  
  53.         For Graphics Boards, ALWAYS 1x1 is used.
  54.  
  55.         IMPLEMENTED WITH SUBLIBRARIES WITH AT LEAST VERSION 2.0 (none up to now...)
  56.  
  57.    INPUTS
  58.         RtgScreen - The RtgScreen to use.
  59.         BufAdr - The address of the buffer to use
  60.         Array - The fastram buffer
  61.         Left - The x position on the Bitmap of RtgScreen where to put the stuff
  62.         Top - The y position
  63.         Width - The Width of the stuff
  64.         Height - The Height of the stuff
  65.  
  66.    SEE ALSO
  67.         CopyRtgPixelArray()
  68.  
  69. rtgmaster.library/CloseClient                               rtgmaster.library/CloseClient
  70.  
  71.    NAME
  72.         CloseClient -- Closes the Client of a TCP/IP connection again
  73.  
  74.    SYNOPSIS
  75.         CloseClient(SBase,Socket)
  76.                      A0    A1
  77.  
  78.         CloseClient(struct Library *,struct TCP_Socket *)
  79.  
  80.    FUNCTION
  81.         Terminates a "virtual connection" of TCP/IP and gives the Socket of the Client
  82.         back to the system. (For UDP it only gives the socket back to the system,
  83.         as there are no "virtual connections" in connectionless UDP).
  84.  
  85.         NOTE: It might appear strange to you, that you have to open bsdsocket.library
  86.         yourselves and provide it as parameter. This is needed because of some internal
  87.         problems of AmiTCP, that make it IMPOSSIBLE opening it inside a library. Look
  88.         at the Docs for more information.
  89.  
  90.         You do NOT have to use rtgmaster.library's Graphics Board features to
  91.         use rtgmaster.library's TCP/IP features, if you do not WANT to...
  92.  
  93.    INPUTS
  94.         SBase    - Result of the call (C Syntax here...)
  95.                    SBase = OpenLibrary("bsdsocket.library",0);
  96.         Socket   - The Socket of the Client you want to close.
  97.                    You should ONLY use this function for Clients,
  98.                    NOT FOR SERVERS !!!
  99.  
  100.  SEE ALSO
  101.         OpenClient(),OpenServer(),CloseServer(),RunServer(),RtgSend(),RtgRecv(),RtgAccept(),RtgIoctl(),GetUDPName(),RtgInAdr()
  102.  
  103. rtgmaster.library/CloseRtgScreen                            rtgmaster.library/CloseRtgScreen
  104.  
  105.    NAME
  106.         CloseRtgScreen -- Close a screen previously opened with
  107.                           OpenRtgScreen
  108.  
  109.    SYNOPSIS
  110.         CloseRtgScreen(RtgScreen)
  111.                         A0
  112.  
  113.         CloseRtgScreen(ULONG)
  114.  
  115.    FUNCTION
  116.         Should close a RtgScreen opened by this sublibrary and free all
  117.         of its resources.
  118.  
  119.    INPUTS
  120.         RtgScreen - A handle for a valid screen previously opened by
  121.                     this sublibrary's OpenRtgScreen() function.
  122.  
  123.    SEE ALSO
  124.         OpenRtgScreen()
  125.  
  126. rtgmaster.library/CloseServer                               rtgmaster.library/CloseServer
  127.  
  128.    NAME
  129.         CloseServer -- Closes the Server of a TCP/IP connection again
  130.  
  131.    SYNOPSIS
  132.         CloseServer(SBase,Socket)
  133.                      A0    A1
  134.  
  135.         CloseServer(struct Library *,struct TCP_Socket *)
  136.  
  137.    FUNCTION
  138.         Terminates a "virtual connection" of TCP/IP and gives the Socket of the Server
  139.         back to the system. For UDP it only gives the socket back to the system, as
  140.         for UDP there is no connection to terminate.
  141.  
  142.         NOTE: It might appear strange to you, that you have to open bsdsocket.library
  143.         yourselves and provide it as parameter. This is needed because of some internal
  144.         problems of AmiTCP, that make it IMPOSSIBLE opening it inside a library. Look
  145.         at the Docs for more information.
  146.  
  147.         You do NOT have to use rtgmaster.library's Graphics Board features to
  148.         use rtgmaster.library's TCP/IP features, if you do not WANT to...
  149.  
  150.    INPUTS
  151.         SBase    - Result of the call (C Syntax here...)
  152.                    SBase = OpenLibrary("bsdsocket.library",0);
  153.         Socket   - The Socket of the Client you want to close.
  154.                    You should ONLY use this function for Servers,
  155.                    NOT FOR CLIENTS !!!
  156.  
  157.  SEE ALSO
  158.         OpenClient(),OpenServer(),CloseClient(),RunServer(),RtgSend(),RtgRecv(),RtgAccept(),RtgIoctl(),GetUDPName(),RtgInAdr()
  159.  
  160. rtgmaster.library/CopyRtgBlit                            rtgmaster.library/CopyRtgBlit
  161.  
  162.    NAME
  163.         CopyRtgBlit -- Copy a rectangular array of pixels without conversion, with
  164.                        Modulo support and c2p support
  165.  
  166.    SYNOPSIS
  167.         CopyRtgBlit(RtgScreen, BufferAdr, Array, Masked. Left, Top, Width, Height, WidthSrc, HeightSrc, SrcX, SrcY)
  168.                      A0         A1         A2     A3      D0    D1   D2     D3      D4        D5         D6    D7
  169.  
  170.         CopyRtgBlit(struct RtgScreen *, APTR, APTR, ULONG, ULONG,
  171.                     ULONG,ULONG,ULONG,ULONG,ULONG,ULONG)
  172.  
  173.    FUNCTION
  174.         Nearly the same like CopyRtgPixelArray, but also has Modulo Support. Additionally,
  175.         it provides c2p for ECS/AGA, while CopyRtgPixelArray works in Planar Mode for
  176.         ECS/AGA. CopyRtgBlit does only support synchronous c2p, as signalling would
  177.         slow down the function a bit. It is faster than CallRtgC2P. In case of a
  178.         asynchrone c2p being chosen, it uses a default synchronous c2p algorithm.
  179.         In fact it is adviced to use this function, the old ones are mainly provided
  180.         for backward compatibility. Masked feature not yet implemented for AGA.
  181.  
  182.    INPUTS
  183.         RtgScreen - The RtgScreen to use
  184.         BufferAdr - The Video RAM Base Address to use
  185.         Array     - The Source Array
  186.         Masked    - If Masked == 1, only pixels != color 0 will be overwritten
  187.         Left      - The Destination X Offset
  188.         Top       - The Destination Y Offset
  189.         Width     - The Width of the Blit
  190.         Height    - The Height of the Blit
  191.         WidthSrc  - The Width of the Source
  192.         HeightSrc - The Height of the Source
  193.         SrcX      - The Source X Offset
  194.         SrcY      - The Source Y Offset
  195.  
  196.    SEE ALSO
  197.         CopyRtgPixelArray(), CallRtgC2P()
  198.  
  199. rtgmaster.library/CopyRtgPixelArray                      rtgmaster.library/CopyRtgPixelArray
  200.  
  201.    NAME
  202.         CopyRtgPixelArray -- Copy a rectangular array of pixels directly
  203.                              to the graphics card memory without any
  204.                              conversion
  205.  
  206.    SYNOPSIS
  207.         CopyRtgPixelArray(RtgScreen, BufferAdr, Array, Left, Top, Width, Height,SrcX,SrcY
  208.                            A0         A1         A2     D0    D1   D2     D3     D4   D5
  209.  
  210.         CopyRtgPixelArray(struct RtgScreen *, APTR, APTR, ULONG, ULONG,
  211.                           ULONG, ULONG,ULONG,ULONG)
  212.  
  213.    FUNCTION
  214.         Copies a rectangular array of pixels directly to the graphics card
  215.         memory with no conversion.  The array of pixels is assumed to be
  216.         in the correct native format so it can be copied at maximum speed.
  217.         The copy routine however does take segment boundaries in account (if
  218.         required).
  219.  
  220.         This routine is mainly intended for machines which have relatively
  221.         fast FastRAM compared to the speed of the graphics card RAM.  This
  222.         is usually on machines with a 32-bit accelerator card which have
  223.         a Zorro-II graphics card installed.
  224.  
  225.         Note: For compatibility with rtgAMI.library,
  226.         Array should contain at least ((((width+15)>>4)<<4)*Height Bytes.
  227.  
  228.         NOT YET IMPLEMENTED ON ECS/AGA. SrcX and SrcY not yet implemented.
  229.  
  230.    INPUTS
  231.         RtgScreen - A handle for a valid screen previously opened by
  232.                     this sublibrary's OpenRtgScreen() function.
  233.         BufferAdr - The address of the memory containing the actual
  234.                     screen graphics
  235.         Array - Pointer to an array of pixels which is Width pixels wide,
  236.                 and Height pixels high.  The size of the pixel is dependant
  237.                 on the ScreenBuffer your copying to.  Make sure the array
  238.                 is in the correct native format.
  239.         Left - X position of the top-left of the rectangular pixel array
  240.         Top - Y position of the top-left of the rectangular pixel array
  241.         Width - Width of the array in pixels
  242.         Height - Height of the array in pixels
  243.  
  244.    SEE ALSO
  245.         OpenRtgScreen(), WritePixelArray(), WritePixelRGBArray()
  246.  
  247.  
  248. rtgmaster.library/DrawRtgLine                                   rtgmaster.library/DrawRtgLine
  249.  
  250.    NAME
  251.         DrawRtgLine - draws a line on a RtgScreen
  252.  
  253.    SYNOPSIS
  254.         DrawRtgLine(RtgScreen, BufferAdr, Color, X1, Y1, X2, Y2)
  255.                      A0         A1         D0     D1  D2  D3  D4
  256.  
  257.         DrawRtgLine(struct RtgScreen *, APTR, ULONG, LONG, LONG, LONG, LONG)
  258.  
  259.    FUNCTION
  260.         Draws a line on the screen which will be clipped if necessary.
  261.         NOTE : X1<=X2 AND Y1<=Y2 !!!
  262.         IMPLEMENTED WITH SUBLIBRARIES WITH AT LEAST VERSION 1.9
  263.  
  264.    INPUTS
  265.         RtgScreen - A handle for a valid screen previously opened by
  266.                     this sublibrary's OpenRtgScreen() function.
  267.         BufferAdr - The address of the memory containing the actual
  268.                     screen graphics
  269.         Color - Color number
  270.         X1,Y1,X2,Y2 - Draws a line from (X1,Y1) to (X2,Y2)
  271.  
  272.    SEE ALSO
  273.         OpenRtgScreen(), DrawRtgLineRGB()
  274.  
  275.  
  276. rtgmaster.library/DrawRtgLineRGB                             rtgmaster.library/DrawRtgLineRGB
  277.  
  278.    NAME
  279.         DrawRtgLineRGB - draws a line on a RtgScreen
  280.  
  281.    SYNOPSIS
  282.         DrawRtgLineRGB(RtgScreen, BufferAdr, Color, X1, Y1, X2, Y2)
  283.                         A0         A1         D0     D1  D2  D3  D4
  284.  
  285.         DrawRtgLineRGB(struct RtgScreen *, APTR, ULONG, LONG, LONG, LONG,
  286.                        LONG)
  287.  
  288.    FUNCTION
  289.         Draws a line on the screen which will be clipped if necessary.
  290.         NOTE: X1<=X2 AND Y1<=Y2 !!!
  291.  
  292.         IMPLEMENTED WITH SUBLIBRARIES WITH AT LEAST VERSION 1.9
  293.  
  294.    INPUTS
  295.         RtgScreen - A handle for a valid screen previously opened by
  296.                     this sublibrary's OpenRtgScreen() function.
  297.         BufferAdr - The address of the memory containing the actual
  298.                     screen graphics
  299.         Color - A 32-bit value describing the color
  300.         X1,Y1,X2,Y2 - Draws a line from (X1,Y1) to (X2,Y2)
  301.  
  302.    SEE ALSO
  303.         OpenRtgScreen(), DrawRtgLine()
  304.  
  305.  
  306. rtgmaster.library/FillRtgRect                                   rtgmaster.library/FillRtgRect
  307.  
  308.    NAME
  309.         FillRtgRect - draws a filled rectangle to a RtgScreen
  310.  
  311.    SYNOPSIS
  312.         FillRtgRect(RtgScreen, BufferAdr, Color, Left, Top, Width, Height)
  313.                      A0         A1         D0     D1    D2   D3     D4
  314.  
  315.         FillRtgRect(struct RtgScreen *, APTR, ULONG, ULONG, ULONG,
  316.                     ULONG, ULONG)
  317.  
  318.    FUNCTION
  319.         Draws a filled rectangle at the specified position on a RtgScreen.
  320.         The BufferAdr is the starting address of the buffer the users wants
  321.         to draw the rectangle in.  The user has obtained this address using
  322.         LockRtgScreen() and GetBufAdr().  The BufferAdr is needed to specify
  323.         the correct buffer for screens which are double or triple buffered.
  324.  
  325.         This function should only work for Palette mapped modes, Color is
  326.         the Color number of the palette.
  327.  
  328.         IMPLEMENTED WITH SUBLIBRARIES WITH AT LEAST VERSION 1.9
  329.  
  330.    INPUTS
  331.         RtgScreen - A handle for a valid screen previously opened by
  332.                     this sublibrary's OpenRtgScreen() function.
  333.         BufferAdr - The address of the memory containing the actual
  334.                     screen graphics
  335.         Color - Color number
  336.         Left - X position of the top-left of the rectangle
  337.         Top - Y position of the top-left of the rectangle
  338.         Width - Width of the rectangle in pixels
  339.         Height - Height of the rectangle in pixels
  340.  
  341.    SEE ALSO
  342.         OpenRtgScreen(), FillRtgRectRGB()
  343.  
  344.  
  345.  
  346. rtgmaster.library/FillRtgRectRGB                             rtgmaster.library/FillRtgRectRGB
  347.  
  348.    NAME
  349.         FillRtgRectRGB - draws a filled rectangle to a RtgScreen
  350.  
  351.    SYNOPSIS
  352.         FillRtgRectRGB(RtgScreen, BufferAdr, Color, Left, Top, Width, Height)
  353.                         A0         A1         D0     D1    D2   D3     D4
  354.  
  355.         FillRtgRectRGB(struct RtgScreen *, APTR, ULONG, ULONG, ULONG,
  356.                        ULONG, ULONG)
  357.  
  358.    FUNCTION
  359.         Draws a filled rectangle at the specified position on a RtgScreen.
  360.         The BufferAdr is the starting address of the buffer the users wants
  361.         to draw the rectangle in.  The user has obtained this address using
  362.         LockRtgScreen() and GetBufAdr().  The BufferAdr is needed to specify
  363.         the correct buffer for screens which are double or triple buffered.
  364.  
  365.         This function should only work for True Color modes, Color is
  366.         a 32 bit value which specifies what Color the pixel should be.
  367.         The layout of this 32-bit value is as follows:
  368.  
  369.         %aaaaaaaa.rrrrrrrr.gggggggg.bbbbbbbb
  370.  
  371.         a = AlphaChannel (8-bits) which may or may not be ignored.  The
  372.             user will set this to zero if the user doesn't want to use
  373.             AlphaChannel.
  374.         r = Red component (8-bits) of the 24-bit RGB value
  375.         g = Green component (8-bits) of the 24-bit RGB value
  376.         b = Blue component (8-bits) of the 24-bit RGB value
  377.  
  378.         IMPLEMENTED WITH SUBLIBRARIES WITH AT LEAST VERSION 1.9
  379.  
  380.    INPUTS
  381.         RtgScreen - A handle for a valid screen previously opened by
  382.                     this sublibrary's OpenRtgScreen() function.
  383.         BufferAdr - The address of the memory containing the actual
  384.                     screen graphics
  385.         Color - A 32-bit value describing the color (see above)
  386.         Left - X position of the top-left of the rectangle
  387.         Top - Y position of the top-left of the rectangle
  388.         Width - Width of the rectangle in pixels
  389.         Height - Height of the rectangle in pixels
  390.  
  391.    SEE ALSO
  392.         OpenRtgScreen(), FillRtgRect()
  393.  
  394. rtgmaster.library/RtgScreenModeReq                          rtgmaster.library/FreeRtgScreenModeReq
  395.  
  396.    NAME
  397.         FreeRtgScreenModeReq - frees the ScreenReq structure again
  398.  
  399.    SYNOPSIS
  400.         FreeRtgScreenModeReq(myreq)
  401.                               A0
  402.  
  403.         FreeRtgScreenModeReq(struct ScreenReq *)
  404.  
  405.    FUNCTION
  406.         This function frees the memory allocated by RtgScreenModeReq again.
  407.         Should be called after you need that data not any longer. Note: This
  408.         function caused a system crash with an early Beta Version of rtgmaster.library.
  409.         This does no longer happen, as this bug got fixed. This function is
  410.         only in the master-library, not in the sublibraries.
  411.  
  412.    INPUTS
  413.         myreq - The ScreenReq Structure returned by RtgScreenModeReq
  414.  
  415.    SEE ALSO
  416.         RtgScreenModeReq()
  417.  
  418. rtgmaster.library/FreeRtgSRList                           rtgmaster.library/RtgAllocSRList
  419.  
  420.    NAME
  421.         FreeRtgSRList - Frees a list of ScreenReq's
  422.  
  423.    SYNOPSIS
  424.         FreeRtgSRList(sr)
  425.                       A0
  426.  
  427.         FreeRtgSRList(struct ScreenReqList *)
  428.  
  429.    FUNCTION
  430.         This function frees a list of ScreenReq structures allocated by
  431.         RtgAllocSRList again.
  432.  
  433.    INPUTS
  434.         sr - the List
  435.  
  436.    SEE ALSO
  437.         RtgScreenModeReq(), FreeRtgScreenModeReq(), RtgAllocSRList()
  438.  
  439. rtgmaster.library/FreeScreenModes                           rtgmaster.library/FreeScreenModes
  440.  
  441.    NAME
  442.         FreeScreenModes - frees a list of screenmodes
  443.  
  444.    SYNOPSIS
  445.         FreeScreenModes(array of screenmodes)
  446.                          A0
  447.  
  448.         FreeScreenModes(APTR)
  449.  
  450.    FUNCTION
  451.         This function should free a previously with GetScreenModes()
  452.         allocated list of ScreenMode structures, including everything else
  453.         GetScreenModes() allocated.  Be prepared to handle a NULL pointer.
  454.         THIS FUNCTION IS ONLY IN SUBLIBRARIES, NOT IN THE MASTER-LIBRARY
  455.         ITSELF. IT IS ONLY CALLED BY RTGMASTER.LIBRARY ITSELF.
  456.  
  457.    INPUTS
  458.         array - an array of ScreenMode structures or NULL
  459.  
  460.    SEE ALSO
  461.         GetScreenModes()
  462.  
  463.  
  464.  
  465. rtgmaster.library/GetBufAdr                                       rtgmaster.library/GetBufAdr
  466.  
  467.    NAME
  468.         GetBufAdr -- Get the address for one of the buffers from a
  469.                      multi-buffered RtgScreen
  470.  
  471.    SYNOPSIS
  472.         address = GetBufAdr(RtgScreen, Buffer)
  473.          D0                  A0         D0
  474.  
  475.         APTR GetBufAdr(ULONG, ULONG)
  476.  
  477.    FUNCTION
  478.         If the user is using multi-buffered screens, it might be usefull
  479.         to know where the two buffers start in memory.  After a
  480.         LockRtgScreen() the user can call this function with a RtgScreen
  481.         handle and a number to get the address of the corresponding
  482.         buffer.
  483.  
  484.         The address is only valid if the RtgScreen is currently locked
  485.         using LockRtgScreen().
  486.  
  487.    INPUTS
  488.         RtgScreen - A handle for a valid screen previously opened by
  489.                     this sublibrary's OpenRtgScreen() function.
  490.         Buffer - The buffer number the user wants the address of
  491.  
  492.    RESULTS
  493.         address - the address of the buffer, or NULL for failure
  494.  
  495.    SEE ALSO
  496.         LockRtgScreen(), OpenRtgScreen()
  497.  
  498.  
  499. rtgmaster.library/GetRtgScreenData                        rtgmaster.library/GetRtgScreenData
  500.  
  501.    NAME
  502.         GetRtgScreenData -- Fills a TagList with data about the RtgScreen 
  503.  
  504.    SYNOPSIS
  505.         GetRtgScreenData(RtgScreen, TagList)
  506.                           A0         A1
  507.  
  508.         GetRtgScreenData(ULONG, struct TagItem *)
  509.  
  510.    FUNCTION
  511.         This function should fill the TI_DATA fields of the passed in
  512.         TagList with the requested information.
  513.  
  514.         See for available tags and descriptions in the .i/.h file.
  515.  
  516.         NOTE: Starting with sublibrary V2.2, this function can also
  517.         be used to find out to what BUSSYSTEM a Graphics Board is
  518.         connected. In the original design of rtgmaster an extra function
  519.         was intended for that, but now it is the job of GetRtgScreenData.
  520.  
  521.    INPUTS
  522.         RtgScreen - A handle for a valid screen previously opened by
  523.                     this sublibrary's OpenRtgScreen() function.
  524.         TagList - TagList which should be filled in with requested info.
  525.  
  526.    SEE ALSO
  527.         OpenRtgScreen(), GetBufAdr()
  528.  
  529.  
  530.  
  531. rtgmaster.library/GetScreenModes                             rtgmaster.library/GetScreenModes
  532.  
  533.    NAME
  534.         GetScreenModes - builds a list of available screenmodes
  535.  
  536.    SYNOPSIS
  537.         array of ScreenMode structures = GetScreenModes()
  538.          D0
  539.  
  540.         APTR GetScreenModes()
  541.  
  542.    FUNCTION
  543.         This function should return a linked list of ScreenMode structures
  544.         describing all the available ScreenModes available to this
  545.         sublibrary.  If there aren't any, or you couldn't allocate the
  546.         memory for the list then return 0. THIS FUNCTION IS ONLY IN SUBLIBRARIES,
  547.         NOT IN THE MASTER-LIBRARY ITSELF. IT IS ONLY CALLED BY RTGMASTER.LIBRARY
  548.         ITSELF.
  549.  
  550.    RESULTS
  551.         array - an array of ScreenMode structures or NULL
  552.  
  553.    SEE ALSO
  554.         FreeScreenModes()
  555.  
  556. rtgmaster.library/GetUDPName                                     rtgmaster.library/GetUDPName
  557.  
  558.    NAME
  559.         GetUDPName - Get the sockaddr_in structure of a UDP Client/Server
  560.  
  561.    SYNOPSIS
  562.         name = GetUDPName(SocketBase, sock)
  563.                     A0          A1
  564.  
  565.         struct sockaddr_in *GetUDPName(struct Library *, struct RTG_Socket *)
  566.  
  567.    FUNCTION
  568.         If this is UDP, you will get the sockaddr_in structure of a Client/Server,
  569.         else you will get 0. For what this is intended, read RtgRecv/RtgSend/RtgInAdr.
  570.         And of course the Docs of rtgmaster.library where detailed information about
  571.         TCP, IP and UDP is found.
  572.  
  573.         NOTE: It might appear strange to you, that you have to open bsdsocket.library
  574.         yourselves and provide it as parameter. This is needed because of some internal
  575.         problems of AmiTCP, that make it IMPOSSIBLE opening it inside a library. Look
  576.         at the Docs for more information.
  577.  
  578.         You do NOT have to use rtgmaster.library's Graphics Board features to
  579.         use rtgmaster.library's TCP/IP features, if you do not WANT to...
  580.  
  581.         Actually this function is now inside rtgextra.library
  582.  
  583.    INPUTS
  584.         SBase    - Result of the call (C Syntax here...)
  585.                    SBase = OpenLibrary("bsdsocket.library",0);
  586.         Socket   - The Socket of the Client you want to close.
  587.                    You should ONLY use this function for Clients,
  588.                    NOT FOR SERVERS !!!
  589.  
  590.    RESULTS
  591.         name     - The sockaddr_in structure of the Client/Server
  592.  
  593.  SEE ALSO
  594.         OpenClient(),OpenServer(),CloseServer(),RunServer(),RtgSend(),RtgRecv(),RtgAccept(),RtgIoctl(),RtgInAdr()
  595.  
  596. rtgmaster.library/LoadRGBRtg                                     rtgmaster.library/LoadRGBRtg
  597.  
  598.    NAME
  599.         LoadRGBRtg - changes one or more colors of a RtgScreen
  600.  
  601.    SYNOPSIS
  602.         LoadRGBRtg(RtgScreen, Table)
  603.                     A0         A1
  604.  
  605.         LoadRGBRtg(ULONG, APTR)
  606.  
  607.    FUNCTION
  608.         Enables the user to change one or more colors of his/her screen.
  609.         This function only works for RtgScreens which have a palette, and
  610.         thus won't work for the True-color modes.
  611.  
  612.    INPUTS
  613.         RtgScreen - A handle for a valid screen previously opened by
  614.                     this sublibrary's OpenRtgScreen() function.
  615.         Table - A pointer to a series of records which describe which
  616.                 colors to modify
  617.  
  618.    NOTES
  619.         Passing a NULL Table must be ignored.  The format of the Table
  620.         passed is a series of records, each with the this format:
  621.  
  622.            WORD  Count value: Number of colors to load
  623.            WORD  Number of first color to be loaded
  624.  
  625.         After these two words, a list of 3 Longs follow as many times
  626.         as specified by the first word.  These 3 longwords represent the
  627.         left justified 32 bit RGB value.
  628.  
  629.         And then the list repeats until ended with a count value of 0.
  630.  
  631.         See for more information about the table graphics/LoadRGB32.
  632.         This function must use the same format.
  633.  
  634.    SEE ALSO
  635.         OpenRtgScreen(), graphics/LoadRGB32()
  636.  
  637.  
  638.  
  639. rtgmaster.library/LockRtgScreen                              rtgmaster.library/LockRtgScreen
  640.  
  641.    NAME
  642.         LockRtgScreen -- Locks a RtgScreen (prevents it from being moved
  643.                          in memory)
  644.  
  645.    SYNOPSIS
  646.         address = LockRtgScreen(RtgScreen)
  647.          D0                      A0
  648.  
  649.         APTR LockRtgScreen(ULONG)
  650.  
  651.    FUNCTION
  652.         This function should make sure that the screen is not moved from
  653.         it's current location in memory.  In other words, it will guarantee
  654.         that the address you get back from this function remains valid
  655.         until you call UnlockRtgScreen().
  656.     
  657.         The result from this function should be the address of the buffer
  658.         associated with the screen either in the graphics cards own
  659.         memory or the computers memory.
  660.  
  661.         For multi-buffered screens the return-address must point to buffer
  662.         0 for this RtgScreen.  To get the addresses of the other
  663.         buffers the user will use GetBufAdr().
  664.  
  665.         LockRtgScreen and UnlockRtgScreen functions must nest, which means
  666.         you must call an UnlockRtgScreen for every LockRtgScreen.  The
  667.         field rs_Locks in the RtgScreen structure should be used to keep
  668.         track of the number of times a screen was locked.
  669.  
  670.         Note : On some Graphics Boards this function will take some
  671.         CPU time to happen, so it is advised ONLY to call it *once* at the start
  672.         of your code (And UnlockRtgScreen *once* at the end of your code,
  673.         to be on the sure side...)
  674.  
  675.    INPUTS
  676.         RtgScreen - A handle for a valid screen previously opened by
  677.                     this sublibrary's OpenRtgScreen() function.
  678.  
  679.    RESULTS
  680.         address - The address of the (first) buffer of this screen.
  681.  
  682.    SEE ALSO
  683.         UnlockRtgScreen(), OpenRtgScreen(), GetBufAdr()
  684.  
  685. rtgmaster.library/OpenClient                                 rtgmaster.library/OpenClient
  686.  
  687.    NAME
  688.         OpenClient    -- Open a TCP/IP Client
  689.  
  690.    SYNOPSIS
  691.         Socket = OpenClient(SBase,host,port,mode,protocol)
  692.          D0                  A0    A1   D0   D1   D2
  693.  
  694.         struct RTG_Socket *OpenClient(struct Library *,char *,int,int,int)
  695.  
  696.    FUNCTION
  697.         For TCP, this function opens a "virtual connection" between two applications.
  698.         For UDP it creates a socket that can be used by the application to
  699.         transfer data connectionless to other applications.
  700.         This function is the "Client part" of the connection. The protocol
  701.         being used is TCP/IP.
  702.  
  703.         For more information, look at the docs. There is a chapter about
  704.         "TCP/IP programming for newcomers", that shows you, how to support
  705.         netework gaming for your computer game, even if you never heard of
  706.         TCP/IP before :) Up to now rtgmaster.library only supports the
  707.         "protocol stack" AmiTCP, no AS225 support up to now.  Runs for sure
  708.         with AmiTCP 4.0 demo from Aminet, i do not know about earlier versions.
  709.  
  710.         NOTE: It might appear strange to you, that you have to open bsdsocket.library
  711.         yourselves and provide it as parameter. This is needed because of some internal
  712.         problems of AmiTCP, that make it IMPOSSIBLE opening it inside a library. Look
  713.         at the Docs for more information.
  714.  
  715.         You do NOT have to use rtgmaster.library's Graphics Board features to
  716.         use rtgmaster.library's TCP/IP features, if you do not WANT to...
  717.  
  718.         Actually this function is now inside rtgextra.library.
  719.  
  720.    INPUTS
  721.         SBase    - Result of the call (C Syntax here...)
  722.                    SBase = OpenLibrary("bsdsocket.library",0);
  723.         host     - hostname of the "Server",  to which you want to connect your
  724.                    application (for example "194.55.101.26").
  725.         port     - The port your application uses. For example 4000.
  726.                    Be sure to use a number bigger than 3000, small numbers
  727.                    are often used for different protocols in TCP/IP. For example
  728.                    21 is telnet.
  729.         mode     - The mode of the connection. Up to now only SOCK_STREAM is
  730.                    supported ("virtual connection using a datastream").
  731.                    SOCK_DGRAM probably will give you a UDP connection, but
  732.                    i do not know enough about UDP to make this really working...
  733.                    maybe in a future version...
  734.         protocol - The protocol To be used. Set this to 0 currently.
  735.                    mode SOCK_STREAM and protocol 0 will result in a TCP connection.
  736.  
  737.  
  738.    RESULTS
  739.         Socket   - The "Socket" of the Application. See more in the docs.
  740.  
  741.    SEE ALSO
  742.         OpenServer(),CloseClient(),CloseServer(),RunServer(),RtgSend(),RtgRecv(),RtgAccept(),RtgIoctl(),GetUDPName(),RtgInAdr()
  743.  
  744. rtgmaster.library/OpenRtgScreen                              rtgmaster.library/OpenRtgScreen
  745.  
  746.    NAME
  747.         OpenRtgScreen -- Open a screen
  748.  
  749.    SYNOPSIS
  750.         RtgScreen = OpenRtgScreen(ScreenReq, RtgTags)
  751.          D0                        A0         A1
  752.  
  753.         struct RtgScreen *OpenRtgScreen(struct ScreenReq *, struct TagItem *)
  754.  
  755.  
  756.    FUNCTION
  757.         This function should open the screen which falls within the 
  758.         parameters specified by the user.  If this function can't
  759.         deliver such a screen than it will fail and will return zero.
  760.  
  761.         Note that the Width and Height values you get from
  762.         rtgmaster.library have been checked to see if they are valid
  763.         for this screenmode.  Also note that RtgTags may be zero.
  764.  
  765.    INPUTS
  766.         RtgTags - Pointer to (an array of) TagItem structures,
  767.                   terminated by the value TAG_END (0).
  768.         ScreenReq - ScreenReq structure as returned by RtgScreenModeReq()
  769.                     of rtgmaster.library, see rtg.i for more information
  770.  
  771.         Each TagItem is an optional tagged data structure which
  772.         identifies a parameter to OpenRtgScreen().  The applicable tag ID
  773.         values for TagItem.ti_Tag and their corresponding data can be
  774.         found in the .i/.h file where the Tags for OpenRtgScreen() are
  775.         specified.
  776.  
  777.    RESULTS
  778.         RtgScreen - A handle for the screen you opened.  The user may
  779.                     later use this handle to get information about
  780.                     this screen or perform actions like setting the 
  781.                     palette or double/triple buffering.  You should
  782.                     returns NULL if the screen couldn't be opened.
  783.  
  784.    SEE ALSO
  785.         CloseRtgScreen()
  786.  
  787. rtgmaster.library/OpenServer                               rtgmaster.library/OpenServer
  788.  
  789.    NAME
  790.         OpenServer - Opens a TCP/IP Server
  791.  
  792.    SYNOPSIS
  793.         Socket=OpenServer(SBase,port,mode,protocol)
  794.          D0                A0    D0   D1   D2
  795.  
  796.         struct TCP_Connect *OpenServer(struct Library *,int,int,int)
  797.  
  798.    FUNCTION
  799.         For TCP this function opens a "virtual connection" between two applications.
  800.         For UDP it creates a server that UDP clients can access.
  801.  
  802.         This function is the "Server part" of the connection. The protocol
  803.         being used is TCP/IP. Up to now, as to the "transport protocol", only
  804.         TCP is supported, no UDP (maybe in a future version ???)
  805.         For more information, look at the docs. There is a chapter about
  806.         "TCP/IP programming for newcomers", that shows you, how to support
  807.         netework gaming for your computer game, even if you never heard of
  808.         TCP/IP before :) Up to now rtgmaster.library only supports the
  809.         "protocol stack" AmiTCP, no AS225 support up to now.  Runs for sure
  810.         with AmiTCP 4.0 demo from Aminet, i do not know about earlier versions.
  811.  
  812.         NOTE: It might appear strange to you, that you have to open bsdsocket.library
  813.         yourselves and provide it as parameter. This is needed because of some internal
  814.         problems of AmiTCP, that make it IMPOSSIBLE opening it inside a library. Look
  815.         at the Docs for more information.
  816.  
  817.         You do NOT have to use rtgmaster.library's Graphics Board features to
  818.         use rtgmaster.library's TCP/IP features, if you do not WANT to...
  819.  
  820.         Actually this function is now inside rtgextra.library.
  821.  
  822.    INPUTS
  823.         SBase    - Result of the call (C Syntax here...)
  824.                    SBase = OpenLibrary("bsdsocket.library",0);
  825.         port     - The port your application uses. For example 4000.
  826.                    Be sure to use a number bigger than 3000, small numbers
  827.                    are often used for different protocols in TCP/IP. For example
  828.                    21 is telnet.
  829.         mode     - The mode of the connection. Up to now only SOCK_STREAM is
  830.                    supported ("virtual connection using a datastream").
  831.                    SOCK_DGRAM probably will give you a UDP connection, but
  832.                    i do not know enough about UDP to make this really working...
  833.                    maybe in a future version...
  834.         protocol - The protocol To be used. Set this to 0 currently.
  835.                    mode SOCK_STREAM and protocol 0 will result in a TCP connection.
  836.  
  837.    RESULTS
  838.         Socket   - The "Socket" of the Application. See more in the docs.
  839.  
  840.  SEE ALSO
  841.         OpenClient(),CloseClient(),CloseServer(),RunServer(),RtgSend(),RtgRecv(),RtgAccept(),RtgIoctl(),GetUDPName(),RtgInAdr()
  842.  
  843. rtgmaster.library/RtgAccept                                rtgmaster.library/RtgAccept
  844.  
  845.    NAME
  846.         RtgAccept - Let the server accept a connection deminded by a Client
  847.  
  848.    SYNOPSIS
  849.         Socket=RtgAccept(SBase,Socket)
  850.          D0               A0    A1
  851.  
  852.         struct RTG_Socket *RtgAccept(struct Library *,struct RTG_Socket *)
  853.  
  854.    FUNCTION
  855.         if you do not use the RunServer function (you do not use it, if you only
  856.         do a point-to-point connection), you have to do this call on Server side
  857.         to wait for the Client to connect. If you use RunSercer, DO NOT USE IT. It
  858.         is only for connecting exactly TWO systems (one being  the server, one the
  859.         client), not for connecting ONE server with SEVERAL clients...
  860.  
  861.         Also do not use it for UDP connection. RtgAccept is only needed for TCP.
  862.         It does not work with UDP.
  863.  
  864.         NOTE: It might appear strange to you, that you have to open bsdsocket.library
  865.         yourselves and provide it as parameter. This is needed because of some internal
  866.         problems of AmiTCP, that make it IMPOSSIBLE opening it inside a library. Look
  867.         at the Docs for more information.
  868.  
  869.         You do NOT have to use rtgmaster.library's Graphics Board features to
  870.         use rtgmaster.library's TCP/IP features, if you do not WANT to...
  871.  
  872.         Actually this function is now inside rtgextra.library.
  873.  
  874.  
  875.    INPUTS
  876.         SBase    - Result of the call (C Syntax here...)
  877.                    SBase = OpenLibrary("bsdsocket.library",0);
  878.         Socket   - the Socket of the Server
  879.  
  880.     RESULTS
  881.         Socket   - The "Socket" of the Client, that connected. See more in the docs.
  882.  
  883.     SEE ALSO
  884.         OpenClient(),CloseClient(),CloseClient(),CloseServer(),RunServer(),RtgSend(),RtgRecv(),RtgIoctl(),GetUDPName(),RtgInAdr()
  885.  
  886. rtgmaster.library/RtgAllocSRList                           rtgmaster.library/RtgAllocSRList
  887.  
  888.    NAME
  889.         RtgAllocSRList - Allocates a list of certain ScreenReq Structures
  890.  
  891.    SYNOPSIS
  892.         RtgAllocSRList(tags)
  893.                         A0
  894.  
  895.         struct ScreenReqList *RtgAllocSMList(struct TagItem *)
  896.  
  897.    FUNCTION
  898.         This function provides a list of ScreenReq Structures for all
  899.         Screenmodes that fit for the provided tags. It can be used
  900.         instead of the RtgMaster ScreenMode-Requester.
  901.         The Memory is freed again with FreeRtgScreenReqList().
  902.  
  903.    INPUTS
  904.         tags - tags describing the modes
  905.  
  906.    SEE ALSO
  907.         RtgScreenModeReq(), FreeRtgScreenModeReq(), FreeRtgSRList()
  908.  
  909. rtgmaster.library/RtgBestSR                                rtgmaster.library/RtgBestSR
  910.  
  911.    NAME
  912.         RtgBestSR - calculates the best to be used ScreenReq Structure
  913.  
  914.    SYNOPSIS
  915.         RtgBestSR(tags)
  916.                   A0
  917.  
  918.         struct ScreenReq *RtgBestSR(struct TagItem *)
  919.  
  920.    FUNCTION
  921.         This function looks for the best to be used ScreenMode for the provided tags
  922.         and returns a ScreenReq Structure for it.
  923.  
  924.    INPUTS
  925.         tags - The Tags for the Screenmode
  926.  
  927.    SEE ALSO
  928.         RtgScreenModeReq(), FreeRtgScreenModeReq(), FreeRtgSRList(), AllocRtgSRList()
  929.  
  930. rtgmaster.library/RtgBlit                                  rtgmaster.library/RtgBlit
  931.  
  932.    NAME
  933.         RtgBlit - Performs a Blit without waiting
  934.  
  935.    SYNOPSIS
  936.         RtgBlit(RtgScreen,SrcBuf,DstBuf,SrcX,SrcY,DstX,DstY,Width,Height,Minterm)
  937.                  A0        a1     a2     d0   d1   d2   d3   d4    d5     d6
  938.  
  939.         void RtgBlit(struct RtgScreen *, ULONG, ULONG, ULONG, ULONG, ULONG, ULONG, ULONG, ULONG,UBYTE)
  940.  
  941.    FUNCTION
  942.         This function blits the rectangle at (SrxX,SrcY) in the Buffer with the
  943.         NUMBER SrcBuf (0-2) to the position (DstX,DstY) in the Buffer with the
  944.         NUMBER DstBuf (0-2). The Blit has Width Width and Height Height.
  945.  
  946.         For most GFX Boards this function is the fastest way to move
  947.         graphics data.
  948.  
  949.         Note : On some boards (for example EGS Boards) this function might
  950.         wait on the Blitter to be finished as this can't be done in an
  951.         other way with these boards. For these boards WaitRtgBlit simply
  952.         does nothing.
  953.  
  954.         Note : The source and the destination rectangle should NOT OVERLAP !!!
  955.  
  956.         Valid minterms : $30,$50,$60,$80, $C0. NO OTHER MINTERMS ARE VALID.
  957.         OTHER MINTERMS MIGHT WORK WITH SOME SUBLIBRARIES, BUT PROBABLY NOT WITH
  958.         ALL SUBLIBRARIES.
  959.  
  960.         Note: This function MIGHT or MIGHT NOT work with some of the Minterms
  961.         on rtgEGS.library... at least for $C0 it works for all... for the rest...
  962.         i do not see myself as Betatester of half-finished WB-Emulations...
  963.  
  964.         THIS FUNCTION IS IMPLEMENTED IN SUBLIBRARIES STARTING WITH VERSION 1.8
  965.  
  966.    INPUTS
  967.         RtgScreen - The RtgScreen where the Blit should happen
  968.         SrcBuf - The Buffer NUMBER (not address !!!) of the Source Buffer
  969.         DstBuf - The Buffer NUMBER (not address !!!) of the Destination Buffer
  970.         SrcX - The X coordinate of the source Rectangle
  971.         SrcY - The Y coordinate of the source Rectangle
  972.         DstX - The X coordinate of the Destination Rectangle
  973.         DstY - The Y coordinate of the Destination Rectangle
  974.         Width - The Width of the Blit
  975.         Height - The Height of the Blit
  976.         minterm - the minterm of the Blit, defined as usual
  977.  
  978.    SEE ALSO
  979.         OpenRtgScreen(), WaitRtgBlit(), SwitchScreens()
  980.  
  981. rtgmaster.library/RtgBltClear                              rtgmaster.library/BltClear
  982.  
  983.    SYNOPSIS
  984.         RtgBltClear(RtgScreen,BufNum,xpos,ypos,width,height)
  985.                      a0        a1     d0   d1   d2    d3
  986.  
  987.         RtgBltClear(struct RtgScreen *,ULONG,ULONG,ULONG,ULONG,ULONG)
  988.  
  989.    FUNCTION
  990.         This function clears a rectangular area using the GFX Board
  991.         blitter. For people who wonder, why i did not implement that
  992.         the "usual" way, like done in graphics.library : The graphics.library
  993.         function would not be possible under EGS, therefor i did it
  994.         this way. The function usually does not wait for the Blitter,
  995.         use WaitRtgBlit for this (unless under EGS... like explained
  996.         in RtgBlit and WaitRtgBlit...)
  997.  
  998.         THIS FUNCTION IS IMPLEMENTED WITH SUBLIBRARIES STARTING WITH VERSION 1.8
  999.  
  1000.    INPUTS
  1001.         RtgScreen - The RtgScreen
  1002.         BufNum - The NUMBER of the concerned Buffer, between 0 and 2 (NOT the buffer address !!!)
  1003.         xpos - the start x position of the rectangle to be cleared
  1004.         ypos - the start y position of the rectangle to be cleared
  1005.         width - the width of the rectangle
  1006.         height - the height of the rectangle
  1007.  
  1008.    SEE ALSO
  1009.         RtgBlit(),WaitRtgBlit()
  1010.  
  1011. rtgmaster.library/RtgCheckVSync                             rtgmaster.library/RtgCheckVSync
  1012.  
  1013.    NAME
  1014.         RtgCheckVSync - Check, if the ray is currently inside Vertical Blank Gap
  1015.  
  1016.    SYNOPSIS
  1017.         RtgCheckVSync(RtgScreen)
  1018.                        A0
  1019.  
  1020.         int RtgCheckVSync(struct RtgScreen *)
  1021.  
  1022.    FUNCTION
  1023.         This function returns 0, if the ray is OUTSIDE the Vertical Blank Gap, 1, if
  1024.         it is INSIDE, and 2, if this is not supported by the GFX Board (in which
  1025.         case a RtgWaitTOF() will be done by this function).
  1026.  
  1027.    INPUTS
  1028.         RtgScreen - The RtgScreen of the GFX Board to be used
  1029.  
  1030.    SEE ALSO
  1031.         RtgWaitTOF()
  1032.  
  1033. rtgmaster.library/RtgClearPointer                           rtgmaster.library/RtgClearPointer
  1034.  
  1035.    NAME
  1036.         RtgClearPointer - resets the pointer to its default image
  1037.  
  1038.    SYNOPSIS
  1039.         RtgClearPointer(RtgScreen)
  1040.                          A0
  1041.  
  1042.         void RtgClearPointer(struct RtgScreen *)
  1043.  
  1044.    FUNCTION
  1045.         This restores the default image of the mousepointer. This is
  1046.         very useful, if you changed it with RtgSetPointer, but sometimes
  1047.         want the default pointer image, too. The pointer is only changed
  1048.         on THIS RtgScreen.
  1049.  
  1050.    INPUTS
  1051.         RtgScreen - The RtgScreen, which pointer should be resetted...
  1052.  
  1053.    NOTES
  1054.        Not implemented yet on rtgPICA.library and rtgEGS.library
  1055.  
  1056.    SEE ALSO
  1057.        RtgSetPointer()
  1058.  
  1059. rtgmaster.library/RtgCloseFont                              rtgmaster.library/RtgCloseFont
  1060.  
  1061.    NAME
  1062.         RtgCloseFont - closes an AmigaFont
  1063.  
  1064.    SYNOPSIS
  1065.         RtgCloseFont(RtgScreen,font)
  1066.                       A0        A1
  1067.  
  1068.         void RtgCloseFont(struct RtgScreen *,void *)
  1069.  
  1070.    FUNCTION
  1071.         This function closes an AmigaFont on
  1072.         a RtgScreen, much the same way, like OpenDiskFont does for
  1073.         Intuition Screens. The font parameter of the call
  1074.         is not for all WB Emulations a TextFont pointer. Don't use
  1075.         CloseFont with rtgmaster.library, use
  1076.         RtgCloseFont, for the best possible compatibility with
  1077.         all Sublibraries !!!
  1078.  
  1079.    INPUTS
  1080.         RtgScreen - an RtgScreen
  1081.         font      - a Font pointer. the structure of it is PRIVATE
  1082.                     to rtgmaster.library (and not the same for all
  1083.                     sublibraries...)
  1084.  
  1085.    NOTES
  1086.         Not yet implemented for rtgPICA.library
  1087.  
  1088.    SEE ALSO
  1089.         RtgOpenFont(),RtgSetFont(),RtgSetTextMode(),RtgText(),RtgSetTextModeRGB
  1090.  
  1091.  
  1092. rtgmaster.library/RtgInAdr                                 rtgmaster.library/RtgInAdr
  1093.  
  1094.    NAME
  1095.         RtgInAdr - Find out the IP Address of a Receiver/Sender
  1096.  
  1097.    SYNOPSIS
  1098.         ip = RtgInAdr(SBase,si)
  1099.         D0             A0   A1
  1100.  
  1101.         char *RtgInAdr(struct Library *,struct sockaddr_in *)
  1102.  
  1103.    FUNCTION
  1104.         This function finds out the IP Address of a Receiver/Sender.
  1105.         You get back the sockaddr_in structure of a receiver/sender by
  1106.         RtgRecv/RtgSend or by using GetUDPName. This function ONLY
  1107.         works for UDP, not for TCP !!! It is used to differentiate
  1108.         Clients running on different machines from each other, if
  1109.         one does a Multiple Client "connection" (should not be called
  1110.         like that, as UDP is connectionless, but do you know a better
  1111.         term ?), without using RunServer...
  1112.  
  1113.         Of course this function can't differentiate multiple Clients
  1114.         running on the same machine...
  1115.  
  1116.         NOTE: It might appear strange to you, that you have to open bsdsocket.library
  1117.         yourselves and provide it as parameter. This is needed because of some internal
  1118.         problems of AmiTCP, that make it IMPOSSIBLE opening it inside a library. Look
  1119.         at the Docs for more information.
  1120.  
  1121.         You do NOT have to use rtgmaster.library's Graphics Board features to
  1122.         use rtgmaster.library's TCP/IP features, if you do not WANT to...
  1123.  
  1124.         Actually this function is now inside rtgextra.library.
  1125.  
  1126.    INPUTS
  1127.           SBase    - Result of the call (C Syntax here...)
  1128.                      SBase = OpenLibrary("bsdsocket.library",0);
  1129.           si       - Special structure returned by above mentioned calls
  1130.  
  1131.    RESULTS
  1132.           ip       - IP Address as string (for example "194.55.101.26")
  1133.  
  1134.    SEE ALSO
  1135.         OpenClient(),OpenServer(),CloseClient(),CloseClient(),CloseServer(),RunServer(),RtgSend(),RtgAccept(),GetUDPName()
  1136.  
  1137. rtgmaster.library/RtgInitBob                               rtgmaster.library/RtgInitBob
  1138.  
  1139.    NAME
  1140.         RtgInitBob - Initializes a RtgBob
  1141.  
  1142.    SYNOPSIS
  1143.         RtgInitBob(RtgScreen, RtgBob,BackAdr,BufferAdr,xpos,ypos,display)
  1144.                     A0         A1      A2     A3       D0    D1   D2
  1145.  
  1146.         RtgInitBob(struct RtgBob *)
  1147.  
  1148.    FUNCTION
  1149.         Initializes a RtgBob for display. This has to be done before using a
  1150.         RtgBob. If the Bob was already initted, the Bob is simply moved
  1151.         to the position given (but you can init and display it in the
  1152.         same function call, also). BackAdr is the BackBuffer to be used
  1153.         with the Bob, this BackBuffer CANNOT be used for Doublebuffering
  1154.         or other purposes (but you can use a Fastram-Buffer as Backbuffer,
  1155.         also). You only have to supply the BackBuffer the first time you
  1156.         use the Bob.
  1157.  
  1158.         Rtgmaster Bobs are limited to 32x32 resolutions.
  1159.  
  1160.         Not yet implemented.
  1161.  
  1162.    INPUTS
  1163.         RtgBob    - The RtgBob structure
  1164.         BackAdr   - The VideoRAM or FastRAM Buffer for Bob Refresh
  1165.         BufferAdr - The Video RAM Buffer, where the Bob should be displayed
  1166.         xpos      - The xposition the Bob should be placed
  1167.         ypos      - The yposition the Bob should be placed
  1168.         display   - If this is 1, the Bob will be switched on, if 0, it will
  1169.                     be disabled.
  1170.  
  1171.    SEE ALSO
  1172.  
  1173. rtgmaster.library/RtgIoctl                                 rtgmaster.library/RtgIoctl
  1174.  
  1175.    NAME
  1176.         RtgIoctl - Set a Socket to "Blocking" or to "Non-Blocking" mode
  1177.  
  1178.    SYNOPSIS
  1179.         result = RtgIoctl(SBase,Socket,arg)
  1180.          D0                A0    A1     A2
  1181.  
  1182.         int RtgIoctl(struct Library *,struct RTG_Socket *,long *)
  1183.  
  1184.    FUNCTION
  1185.         This function determins, if RtgRecv and RtgSend will WAIT will the data
  1186.         was transmitted, or if they fail, if the data currently could not be
  1187.         transmitted. If arg POINTS to the VALUE 1, we have "non-blocking" (it does
  1188.         not wait), if it POINTS to 0, we have "blocking" (it waits). Default (if
  1189.         you do not call RtgIoctl at all) is "blocking".
  1190.  
  1191.         NOTE: It might appear strange to you, that you have to open bsdsocket.library
  1192.         yourselves and provide it as parameter. This is needed because of some internal
  1193.         problems of AmiTCP, that make it IMPOSSIBLE opening it inside a library. Look
  1194.         at the Docs for more information.
  1195.  
  1196.         You do NOT have to use rtgmaster.library's Graphics Board features to
  1197.         use rtgmaster.library's TCP/IP features, if you do not WANT to...
  1198.  
  1199.         RtgIoctl is a VERY CPU TIME INTENSIVE FUNCTION !!!
  1200.         Only call it during the INITIALIZATION of the network !!!
  1201.  
  1202.         My suggestion : Run the server in "blocking" mode, the Clients in
  1203.         "nonblocking" mode... seems to be the fastest...
  1204.  
  1205.         Actually this function is now inside rtgextra.library.
  1206.  
  1207.    INPUTS
  1208.         SBase    - Result of the call (C Syntax here...)
  1209.                    SBase = OpenLibrary("bsdsocket.library",0);
  1210.         Socket   - The Socket of the application, which socket is to be modified
  1211.         arg      - "Non-Blocking" or "Blocking" (a pointer)
  1212.  
  1213.    RESULTS
  1214.         result   - 0 on success, -1 on fail (should not fail,normally...)
  1215.  
  1216.    SEE ALSO
  1217.         OpenClient(),OpenServer(),CloseClient(),CloseClient(),CloseServer(),RunServer(),RtgSend(),RtgAccept(),GetUDPName(),RtgInAdr()
  1218.  
  1219. rtgmaster.library/RtgOpenFont                              rtgmaster.library/RtgOpenFont
  1220.  
  1221.    NAME
  1222.         RtgOpenFont - opens an AmigaFont
  1223.  
  1224.    SYNOPSIS
  1225.         font = RtgOpenFont(RtgScreen,ta)
  1226.          D0                 A0       A1
  1227.  
  1228.         void * RtgOpenFont(struct RtgScreen *,struct TextAttr *)
  1229.  
  1230.    FUNCTION
  1231.         This function loads an AmigaFont to memory, for the usage on
  1232.         a RtgScreen, much the same way, like OpenDiskFont does for
  1233.         Intuition Screens. ta is a normal TextAttr pointer, like
  1234.         for OpenDiskFont for diskfont.library, but the RESULT
  1235.         is not for all WB Emulations a TextFont pointer. Don't use
  1236.         OpenDiskFont or OpenFont with rtgmaster.library, use
  1237.         RtgOpenFont, for the best possible compatibility with
  1238.         all Sublibraries !!!
  1239.  
  1240.    INPUTS
  1241.         RtgScreen - an RtgScreen
  1242.         ta        - a TextAttr structure, like defined in graphics/text.i (or .h)
  1243.  
  1244.    RESULTS
  1245.         font      - A pointer to a font pointer. It's internal structure is
  1246.                     PRIVATE to rtgmaster.library, and NOT THE SAME for all
  1247.                     sublibraries
  1248.  
  1249.    NOTES
  1250.         Not yet implemented for rtgPICA.library
  1251.  
  1252.    SEE ALSO
  1253.         RtgCloseFont(),RtgSetFont(),RtgSetTextMode(),RtgText(),RtgSetTextModeRGB
  1254.  
  1255. rtgmaster.library/RtgRecv                                  rtgmaster.library/RtgRecv
  1256.  
  1257.    NAME
  1258.         RtgRecv - The Socket of this application receives data from a connected socket
  1259.  
  1260.    SYNOPSIS
  1261.         length = RtgRecv(SBase,Socket,message,sender,len)
  1262.          D0               A0    A1     A2      A3     D0
  1263.  
  1264.         int RtgRecv(struct Library *,struct RTG_Socket *,struct char *,struct sockaddr_in *,int)
  1265.  
  1266.    FUNCTION
  1267.         This function is no longer compatible to rtgmaster.library V6 and below !!!
  1268.  
  1269.         This function gets data to the application that is sent to its socket by a socket
  1270.         that is connected to the socket of the Application (it is not that difficult to
  1271.         understand like it sounds... read the docs :) )
  1272.  
  1273.         If the "virtual connection" (or the "connectionless connection" or what this is called
  1274.         for UDP... :) ) is "blocking", it WAITS, if there is no message available
  1275.         on the socket, till one is available. If it is "non-blocking", it returns -1, if no
  1276.         message is available (see RtgIoctl for more details about "blocking" and "Non-Blocking".
  1277.         The default is "Blocking", BTW...)
  1278.  
  1279.         Sender is a special structure that you can use to find out from what IP Address
  1280.         the message was sent. You can convert it to an IP Address using RtgInAdr. This
  1281.         only works with UDP (with TCP, you differentiate Clients from each other with the
  1282.         socket number...). Appearently, you CAN'T differentiate Clients that run on the
  1283.         same machine !!! Sender is NOT allocated by the function, you have to provide
  1284.         the structure...
  1285.  
  1286.         For TCP you simple provide a 0 for Sender. It will be ignored.
  1287.  
  1288.         You can use this feature to do multiple connection without using RunServer (that
  1289.         does not support UDP up to now anyways...).
  1290.  
  1291.         NOTE: For *TCP* you provide the Socket of the Application which you want to
  1292.         contact. For *UDP* you provide your OWN'S Socket. Important difference !!!
  1293.  
  1294.         NOTE: It might appear strange to you, that you have to open bsdsocket.library
  1295.         yourselves and provide it as parameter. This is needed because of some internal
  1296.         problems of AmiTCP, that make it IMPOSSIBLE opening it inside a library. Look
  1297.         at the Docs for more information.
  1298.  
  1299.         You do NOT have to use rtgmaster.library's Graphics Board features to
  1300.         use rtgmaster.library's TCP/IP features, if you do not WANT to...
  1301.  
  1302.         NOTE: It is NOT possible to give Socket->s (the Socket Number) of a Client
  1303.         to the Server using RtgRecv or RunServer !!! You will have to examine
  1304.         inbuffer->num[x] to find out which Socket was the Sender !!! Also len
  1305.         should NEVER be bigger than the actual message, or you might get a lot
  1306.         of strange results !!!
  1307.  
  1308.         Actually this function is now inside rtgextra.library.
  1309.  
  1310.    INPUTS
  1311.         SBase    - Result of the call (C Syntax here...)
  1312.                    SBase = OpenLibrary("bsdsocket.library",0);
  1313.         Socket   - The Socket of THIS application
  1314.         message  - The buffer, to which supplied messages will be put
  1315.         Sender   - The Function will fill in data about the Sender to this structure.
  1316.         len      - The length of the message to wait for
  1317.  
  1318.    RESULTS
  1319.         length   - The length of the message received. If it is smaller
  1320.                    than the message, you waited for, do a RtgRecv once more...
  1321.                    NOTE: If a message was received that is too long to fit to
  1322.                    the buffer, some Bytes might be discarded. So you should
  1323.                    not send more Bytes than you want to receive... use a standard
  1324.                    Package Size at best...
  1325.     SEE ALSO
  1326.         OpenClient(),CloseClient(),CloseClient(),CloseServer(),RunServer(),RtgSend(),RtgAccept(),RtgIoctl(),GetUDPName(),RtgInAdr()
  1327.  
  1328. rtgmaster.library/RtgScreenAtFront                         rtgmaster.library/RtgScreenAtFront
  1329.  
  1330.    NAME
  1331.         RtgScreenAtFront - determines if a RtgScreen is at front
  1332.  
  1333.    SYNOPSIS
  1334.         boolean = RtgScreenAtFront(RtgScreen)
  1335.                                     A0
  1336.  
  1337.         RtgScreenAtFront(struct RtgScreen *)
  1338.  
  1339.    FUNCTION
  1340.         This function should determine if this RtgScreen is currently at
  1341.         front.  It should return TRUE (0xfffffff) if the screen is in front
  1342.         of all other screens, and FALSE (0) if the screen is behind (partially
  1343.         or completely) an other screen.
  1344.  
  1345.         Note that this function will not be heavily reliable, since the user
  1346.         might switch screens at any time.
  1347.  
  1348.    INPUTS
  1349.         RtgScreen - A handle for a valid screen previously opened by
  1350.                     this sublibrary's OpenRtgScreen() function.
  1351.  
  1352.    RESULTS
  1353.         boolean - TRUE if screen is at front, FALSE otherwise.
  1354.  
  1355.    SEE ALSO
  1356.         OpenRtgScreen()
  1357.  
  1358. rtgmaster.library/RtgScreenModeReq                        rtgmaster.library/RtgScreenModeReq
  1359.  
  1360.    NAME
  1361.         RtgScreenModeReq -- Opens a ScreenMode requester
  1362.  
  1363.    SYNOPSIS
  1364.         ScreenReq = RtgScreenModeReq(ScreenModeTags)
  1365.          D0                           A0
  1366.  
  1367.         struct ScreenReq *RtgScreenModeReq(struct TagItem *)
  1368.  
  1369.    FUNCTION
  1370.         Opens a ScreenMode requester which displays all available
  1371.         ScreenModes to the user, depending on the Tags which are passed
  1372.         to this function.  The functions returns a pointer to a
  1373.         ScreenReq structure or NULL for failure or if the user
  1374.         cancelled the requester.
  1375.  
  1376.         The ScreenReq holds various information which the user selected,
  1377.         like width, height, screenmode and depth.
  1378.  
  1379.         THIS FUNCTION IS ONLY IN THE MASTER-LIBRARY. It handles the Screenmodes
  1380.         for ALL sublibraries.
  1381.  
  1382.         Note: The Screenmode-Requester provided with an early Beta of the
  1383.         rtgmaster.library was VERY buggy. It got completely replaced by
  1384.         a new one for this version of the library.
  1385.  
  1386.    INPUTS
  1387.         ScreenModeTags - Pointer to (an array of) TagItem structures,
  1388.                          terminated by the value TAG_END (0).
  1389.  
  1390.         The description for the various tags can be found in the .i/.h
  1391.         file (smr_Tags). NOTE: The Tags changed a lot since the early
  1392.         Beta release of the library.
  1393.  
  1394.    RESULTS
  1395.         ScreenReq - A pointer to a ScreenReq structure or NULL for
  1396.                     failure
  1397.  
  1398.    SEE ALSO
  1399.         OpenRtgScreen(),FreeRtgScreenModeReq()
  1400.  
  1401. rtgmaster.library/RtgSend                                  rtgmaster.library/RtgSend
  1402.  
  1403.    NAME
  1404.         RtgSend - The Socket of this application sends data to a connected socket
  1405.  
  1406.    SYNOPSIS
  1407.         length = RtgSend(SBase,Socket,message,Receiver,len)
  1408.          D0               A0    A1     A2      A3       D0
  1409.  
  1410.         int RtgSend(struct Library *,struct RTG_Socket *,struct char *,struct sockaddr_in *,int)
  1411.  
  1412.    FUNCTION
  1413.         This function is no longer compatible to rtgmaster.library V6 and below !!!
  1414.  
  1415.         This function puts data from the application to the socket of an application
  1416.         that is connected to the socket of the Application (it is not that difficult to
  1417.         understand like it sounds... read the docs :) )
  1418.  
  1419.         If the "virtual connection" (well, this term does not fit for UDP, as it is
  1420.         connectionless, but i do not know how to call it else... :) ) is "blocking", it WAITS, if there is no message available
  1421.         on the socket, till one is available. If it is "non-blocking", it returns -1, if no
  1422.         message is available (see RtgIoctl for more details about "blocking" and "Non-Blocking".
  1423.         The default is "Blocking", BTW...)
  1424.  
  1425.         Receiver is a special structure that you can use to tell the receiver your IP Address.
  1426.         You get your IP Address with GetUDPName (works only for UDP... for TCP this returns
  1427.         0...). For TCP you provide simply 0 for Receiver, it will be ignored.
  1428.         You can convert it to an IP Address using RtgInAdr. This
  1429.         only works with UDP (with TCP, you differentiate Clients from each other with the
  1430.         socket number...). Appearently, you CAN'T differentiate Clients that run on the
  1431.         same machine !!!
  1432.  
  1433.         You can use this feature to do multiple connection without using RunServer (that
  1434.         does not support UDP up to now anyways...).
  1435.  
  1436.         NOTE: For *TCP* you provide the Socket of the Application which you want to
  1437.         contact. For *UDP* you provide your OWN'S Socket. Important difference !!!
  1438.  
  1439.         NOTE: It might appear strange to you, that you have to open bsdsocket.library
  1440.         yourselves and provide it as parameter. This is needed because of some internal
  1441.         problems of AmiTCP, that make it IMPOSSIBLE opening it inside a library. Look
  1442.         at the Docs for more information.
  1443.  
  1444.         You do NOT have to use rtgmaster.library's Graphics Board features to
  1445.         use rtgmaster.library's TCP/IP features, if you do not WANT to...
  1446.  
  1447.         NOTE: It is NOT possible to give Socket->s (the Socket Number) of a Client
  1448.         to the Server using RtgRecv or RunServer !!! You will have to examine
  1449.         inbuffer->num[x] to find out which Socket was the Sender !!! Also len
  1450.         should NEVER be bigger than the actual message, or you might get a lot
  1451.         of strange results !!!
  1452.  
  1453.         Actually this function is now inside rtgextra.library.
  1454.  
  1455.    INPUTS
  1456.         SBase    - Result of the call (C Syntax here...)
  1457.                    SBase = OpenLibrary("bsdsocket.library",0);
  1458.         Socket   - The Socket of THIS application
  1459.         message  - The message to be sent (an ASCII string, actually...)
  1460.         Receiver - The data you got from GetUDPName, tells the receiver your IP address...
  1461.         len      - The length of the string to send ...
  1462.  
  1463.    RESULTS
  1464.         length   - The length of the message sent. If it is smaller
  1465.                    than the message, you sent, do a RtgSend once more...
  1466.                    Probably the socket you sent to was quite busy with other
  1467.                    messages currently...
  1468.  
  1469.                    NOTE: If the send fails at all, maybe your message was too
  1470.                    long for TCP/IP ? (As to the allowed package sizes, 1 KB works
  1471.                    for sure... i do not know exactly how much more is possible...)
  1472.  
  1473.     SEE ALSO
  1474.         OpenClient(),CloseClient(),CloseClient(),CloseServer(),RunServer(),RtgRecv(),RtgAccept(),RtgIoctl(),GetUDPName(),RtgInAdr()
  1475.  
  1476. rtgmaster.library/RtgSetFont                              rtgmaster.library/RtgSetFont
  1477.  
  1478.    NAME
  1479.         RtgSetFont - sets an AmigaFont to an RtgScreen
  1480.  
  1481.    SYNOPSIS
  1482.         RtgSetFont(RtgScreen,font)
  1483.                     A0        A1
  1484.  
  1485.         void RtgSetFont(struct RtgScreen *,void *)
  1486.  
  1487.    FUNCTION
  1488.         This function sets an AmigaFont (that was opened using
  1489.         RtgOpenFont tomemory before) to an RtgScreen. Following
  1490.         RtgText() calls will use this font, now.
  1491.  
  1492.    INPUTS
  1493.         RtgScreen - an RtgScreen
  1494.         font      - a Font pointer. the structure of it is PRIVATE
  1495.                     to rtgmaster.library (and not the same for all
  1496.                     sublibraries...)
  1497.  
  1498.    NOTES
  1499.         Not yet implemented for rtgPICA.library
  1500.  
  1501.    SEE ALSO
  1502.         RtgOpenFont(),RtgCloseFont(),RtgSetTextMode(),RtgText(),RtgSetTextModeRGB
  1503.  
  1504. rtgmaster.library/RtgSetPointer                           rtgmaster.library/RtgSetPointer
  1505.  
  1506.    NAME
  1507.         RtgSetPointer - sets the pointer to a new image
  1508.  
  1509.    SYNOPSIS
  1510.         RtgSetPointer(RtgScreen,pointer,Width,Height,OffsetX,OffsetY)
  1511.                          A0      A1      D0    D1     D2      D3
  1512.  
  1513.         void RtgSetPointer(struct RtgScreen *,UWORD *,WORD,WORD,WORD,WORD)
  1514.  
  1515.    FUNCTION
  1516.         This function sets the mousepointer to a new image for this RtgScreen.
  1517.         The structure pointer is exactly the same like taken from intuition.library
  1518.         command SetPointer (the data definition of a Simple Sprite). Different
  1519.         from this only is that the image HAS TO BE 16x18 pixels size. If you
  1520.         want a smaller pointer, modify the Width/Height values and set that
  1521.         pixels that you do not need to 0. But the SIZE of the structure has
  1522.         to be 16x18 pixels (72 Bytes). An example :
  1523.  
  1524.         UWORD Hoehe[2]
  1525.         {
  1526.             0x...,0x... // first line
  1527.             ...
  1528.             0x...,0x... // 18th line
  1529.         }
  1530.  
  1531.         Look at graphics.library SimpleSprite documentation for more information
  1532.         (01,10,11 are the three pointer colors,00 is transperent, each of
  1533.         the two words of a line determines ONE BIT of the 2-Bit mousepointer).
  1534.  
  1535.    INPUTS
  1536.         RtgScreen - The RtgScreen, which pointer should be resetted...
  1537.         pointer   - pointer image, see above
  1538.         Width     - Actual Width of the pointer
  1539.         Height    - Actual Height of the pointer
  1540.         OffsetX   - Display Offset for the pointer, from the mouseposition
  1541.         OffsetY   - Display Offset for the pointer, from the mouseposition
  1542.  
  1543.    NOTES
  1544.        Not implemented yet on rtgPICA.library and rtgEGS.library
  1545.  
  1546.        Do NOT specifically demand Chipram for the pointer array.
  1547.        Else your program won't run on the DraCo. rtgmaster.library will
  1548.        handle this itself, that the pointer-image will end in
  1549.        Chipram for ECS/AGA, in ANYTHING AVAILABLE on GFX Board system.
  1550.        So simply allocate RAM for the pointer image, without simply
  1551.        demanding Chipram or Fastram (as DraCo needs FastRam, and
  1552.        ECS/AGA need Chipram here... but well... rtgmaster.library
  1553.        takes care of this :) )
  1554.  
  1555.    SEE ALSO
  1556.        RtgClearPointer()
  1557.  
  1558. rtgmaster.library/RtgSetTextMode                              rtgmaster.library/RtgSetTextMode
  1559.  
  1560.    NAME
  1561.         RtgSetTextMode - sets text color and drawing mode
  1562.  
  1563.    SYNOPSIS
  1564.         RtgSetTextMode(RtgScreen,fgcolor,bgcolor,drmode)
  1565.                         A0        D0      D1      D2
  1566.  
  1567.         void RtgSetTextMode(struct RtgScreen *,UBYTE,UBYTE,UBYTE)
  1568.  
  1569.    FUNCTION
  1570.         Sets the foreground color, the background color and the drawing
  1571.         mode for Text on this RtgScreen.  drmodes are defined as usual
  1572.         in graphics/rastport.i (or .h) : JAM1, JAM2, COMPLEMENT.
  1573.         INVERSVID is not valid...
  1574.  
  1575.         This function should only be used on Displays with depth <=8.
  1576.  
  1577.    INPUTS
  1578.         RtgScreen - an RtgScreen
  1579.         fgcolor   - Foreground color
  1580.         bgcolor   - Background color
  1581.         drwmode   - Drawing mode, defined in graphics/rastport.i (or .h)
  1582.  
  1583.    NOTES
  1584.         Not yet implemented for rtgPICA.library
  1585.  
  1586.    SEE ALSO
  1587.         RtgOpenFont(),RtgSetFont(),RtgCloseFont(),RtgText(),RtgSetTextModeRGB()
  1588.  
  1589.  
  1590. rtgmaster.library/RtgSetTextModeRGB                              rtgmaster.library/RtgSetTextModeRGB
  1591.  
  1592.    NAME
  1593.         RtgSetTextModeRGB - sets text color and drawing mode for depths >8
  1594.  
  1595.    SYNOPSIS
  1596.         RtgSetTextModeRGB(RtgScreen,fgcolor,bgcolor,drmode)
  1597.                         A0        D0      D1      D2
  1598.  
  1599.         void RtgSetTextModeRGB(struct RtgScreen *,ULONG,ULONG,UBYTE)
  1600.  
  1601.    FUNCTION
  1602.         Sets the foreground color, the background color and the drawing
  1603.         mode for Text on this RtgScreen.  drmodes are defined as usual
  1604.         in graphics/rastport.i (or .h) : JAM1, JAM2, COMPLEMENT.
  1605.         INVERSVID is not valid...
  1606.  
  1607.         Should only be used on Displays with depth >8.
  1608.  
  1609.    NOTES
  1610.         Due to a bug in CyberGraphX, this function does not work
  1611.         very well with rtgCGX.library (strange colors...). Not yet
  1612.         implemented in rtgPICA.library.
  1613.  
  1614.    INPUTS
  1615.         RtgScreen - an RtgScreen
  1616.         fgcolor   - Foreground color
  1617.         bgcolor   - Background color
  1618.         drwmode   - Drawing mode, defined in graphics/rastport.i (or .h)
  1619.  
  1620.  
  1621.    SEE ALSO
  1622.         RtgOpenFont(),RtgSetFont(),RtgCloseFont(),RtgText(),RtgSetTextMode()
  1623.  
  1624.  
  1625. rtgmaster.library/RtgText                              rtgmaster.library/RtgText
  1626.  
  1627.    NAME
  1628.         RtgText - displays Text on an RtgScreen
  1629.  
  1630.    SYNOPSIS
  1631.         RtgText(RtgScreen,buffer,string,length,xpos,ypos)
  1632.                  A0        A1     A2     D0     D1   D2
  1633.  
  1634.         void RtgText(struct RtgScreen *,void *,char *,WORD,SHORT,SHORT)
  1635.  
  1636.    FUNCTION
  1637.         Displays the string "string" with the chosen font parameters (see
  1638.         RtgSetFont(), RtgSetTextMode(), RtgSetTextModeRGB() ) at position
  1639.         xpos,ypos much the same way like Text() of graphics.library does.
  1640.  
  1641.    INPUTS
  1642.         RtgScreen - an RtgScreen
  1643.         buffer    - The buffer address of the buffer where to display the text
  1644.         string    - pointer to a string
  1645.         length    - length of the string in characters
  1646.         xpos      - the x-pos
  1647.         ypos      - the y-pos
  1648.  
  1649.    NOTES
  1650.         Not yet implemented for rtgPICA.library.
  1651.  
  1652.    SEE ALSO
  1653.         RtgOpenFont(),RtgSetFont(),RtgCloseFont(),RtgCloseFont(),RtgSetTextModeRGB(),RtgSetTextMode()
  1654.  
  1655.  
  1656.  
  1657. rtgmaster.library/RtgWaitTOF                                  rtgmaster.library/RtgWaitTOF
  1658.  
  1659.    NAME
  1660.         RtgWaitTOF - Wait for the top of the next video frame.
  1661.  
  1662.    SYNOPSIS
  1663.         WaitTOF(RtgScreen)
  1664.                  A0
  1665.  
  1666.         WaitTOF(struct RtgScreen *)
  1667.  
  1668.    FUNCTION
  1669.         Wait  for vertical blank to occur and all vertical blank
  1670.         interrupt routines to complete before returning to caller.
  1671.  
  1672.         Does not do anything at all with some sublibraries... (CyberGraphX does not
  1673.         support TOF-Waiting up to now...)
  1674.  
  1675.    INPUTS
  1676.         The Screen Handle of the GFX Board Screen (only in FACT needed for rtgEGS.library,
  1677.         and probably nothing much is done about it anyway... but be nice... give this
  1678.         parameter... to stay compatible :) )
  1679.  
  1680.    RESULTS
  1681.         Places this task on the TOF wait queue. When the vertical blank
  1682.         interrupt comes around, the interrupt service routine will fire off
  1683.         signals to all the tasks doing WaitTOF. The highest priority task
  1684.         ready will get to run then.
  1685.  
  1686.    SEE ALSO
  1687.        graphics.library/WaitTOF()
  1688.  
  1689. rtgmaster.library/RunServer                                      rtgmaster.library/RunServer
  1690.  
  1691.    NAME
  1692.         RunServer -- Handle all the messaging for a server and several clients
  1693.  
  1694.    SYNOPSIS
  1695.         New_Socket = RunServer(SBase,Socket,in_buffer,out_buffer,maxplayers)
  1696.          D0                     A0    A1     A2        A3         D0
  1697.  
  1698.         struct RTG_Socket *RunServer(struct Library *,struct RTG_Socket *,struct RTG_Buff *,struct RTG_Buff *,int)
  1699.  
  1700.    FUNCTION
  1701.         You will have to run this fine
  1702.         function in a loop. Every time it returns, it gives you the Socket of a new connected
  1703.         client or 0, if no new Client connected. Also, in  in_buffer, you will have all new
  1704.         messages sent from  already connected Clients to the server, and all messages you filled
  1705.         in in out_buffer before calling this function, will be sent to the Clients.
  1706.         If nothing happened, this function returns at once, with consuming nearly no CPU time.
  1707.  
  1708.         You SHOULD initialize the in_buffer.num values with -1 EACH TIME, before
  1709.         RunServer is run, and the out_buffer.num values once before the FIRST TIME
  1710.         RunServer is called !!!
  1711.  
  1712.         NOTE: If you (later...) use RunServer, the Server can't handle a Player. You need
  1713.         ONE CLIENT PER PLAYER AND AN ADDITIONAL SERVER WITHOUT A PLAYER. The Server can run
  1714.         on a system, where a Client is also running, though (should be the fastest system in
  1715.         the connection, probably, as it will have to do all that messaging to the Client ...)
  1716.  
  1717.         NOTE: It might appear strange to you, that you have to open bsdsocket.library
  1718.         yourselves and provide it as parameter. This is needed because of some internal
  1719.         problems of AmiTCP, that make it IMPOSSIBLE opening it inside a library. Look
  1720.         at the Docs for more information.
  1721.  
  1722.         You do NOT have to use rtgmaster.library's Graphics Board features to
  1723.         use rtgmaster.library's TCP/IP features, if you do not WANT to...
  1724.  
  1725.         NOTE: It is NOT possible to give Socket->s (the Socket Number) of a Client
  1726.         to the Server using RtgRecv or RunServer !!! You will have to examine
  1727.         inbuffer->num[x] to find out which Socket was the Sender !!! Also len
  1728.         should NEVER be bigger than the actual message, or you might get a lot
  1729.         of strange results !!!
  1730.  
  1731.         Actually this function is now inside rtgextra.library.
  1732.  
  1733.  
  1734.    INPUTS
  1735.         SBase      - Result of the call (C Syntax here...)
  1736.                      SBase = OpenLibrary("bsdsocket.library",0);
  1737.         Socket     - The Socket of THIS application (the Server...)
  1738.         in_buffer  - messages that arrived during the call of RunServer
  1739.         out_buffer - messages that Run_Server should deliver
  1740.         maxplayers - The Maximum of Clients allowed (CAN'T BE BIGGER THAN 12 !!!)
  1741.  
  1742.    RESULTS
  1743.         New_Socket - The Socket of a newly connected Client. Save it somewhere...
  1744.  
  1745.    SEE ALSO
  1746.         OpenClient(),CloseClient(),CloseClient(),CloseServer(),RunServer(),RtgRecv(),RtgSend(),RtgAccept(),RtgIoctl(),GetUDPName(),RtgInAdr()
  1747.  
  1748. rtgmaster.library/SwitchScreens                              rtgmaster.library/SwitchScreens
  1749.  
  1750.    NAME
  1751.         SwitchScreens -- Perform doublebuffering
  1752.  
  1753.    SYNOPSIS
  1754.         SwitchScreens(RtgScreen, Buffer)
  1755.                        A0         D0
  1756.  
  1757.         SwitchScreens(ULONG, ULONG)
  1758.  
  1759.    FUNCTION
  1760.         RtgScreen passed in A0 is a handle of a screen previously opened
  1761.         by OpenRtgScreen().
  1762.  
  1763.         This functions is used to specify the buffer which should
  1764.         be displayed starting from the next Vertical Blank.  The buffer
  1765.         supplied is a simple number (0 = first buffer, 1 = 2nd buffer
  1766.         etcetera).
  1767.  
  1768.         If the same buffer is being specified as is being displayed then
  1769.         this function should do nothing.
  1770.  
  1771.         This function will never be called from interupts.
  1772.  
  1773.    INPUTS
  1774.         RtgScreen - A handle for a valid screen previously opened by
  1775.                     this sublibrary's OpenRtgScreen() function.
  1776.         Buffer - The buffer number the user wishes to display
  1777.  
  1778.    SEE ALSO
  1779.         OpenRtgScreen(),WaitRtgSwitch()
  1780.  
  1781.  
  1782.  
  1783. rtgmaster.library/UnlockRtgScreen                          rtgmaster.library/UnlockRtgScreen
  1784.  
  1785.    NAME
  1786.         UnlockRtgScreen -- Unlocks a RtgScreen
  1787.  
  1788.    SYNOPSIS
  1789.         UnlockRtgScreen(RtgScreen)
  1790.                          A0
  1791.  
  1792.         UnlockRtgScreen(ULONG)
  1793.  
  1794.    FUNCTION
  1795.         Unlocks a previously locked RtgScreen.  If this screen hasn't
  1796.         been locked before this function will do nothing.
  1797.  
  1798.         LockRtgScreen() and UnlockRtgScreen() functions nest, which means
  1799.         the user must call an UnlockRtgScreen() for every LockRtgScreen().
  1800.         If not the user will end up with a permenantly locked screen.
  1801.  
  1802.    INPUTS
  1803.         RtgScreen - A handle for a valid screen previously opened by
  1804.                     this sublibrary's OpenRtgScreen() function.
  1805.  
  1806.    SEE ALSO
  1807.         LockRtgScreen()
  1808.  
  1809. rtgmaster.library/WaitRtgBlit                                 rtgmaster.library/WaitRtgBlit
  1810.  
  1811.    NAME
  1812.         WaitRtgBlit - Waits on the Blitter to be finished
  1813.  
  1814.    SYNOPSIS
  1815.         WaitRtgBlit(RtgScreen)
  1816.                     A0
  1817.  
  1818.         WaitRtgBlit(struct RtgScreen *)
  1819.  
  1820.    FUNCTION
  1821.         Waits for the GFX Board Blitter to be finished. For those who wonder,
  1822.         why RtgScreen has to be given as parameter... it probably won't be used...
  1823.         just to be on the sure side :)
  1824.  
  1825.         Does not do anything at all with some sublibraries. Some of them ALWAYS wait...
  1826.  
  1827.    INPUTS
  1828.         RtgScreen - The RtgScreen structure
  1829.  
  1830.    SEE ALSO
  1831.         OpenRtgScreen(), RtgBlit()
  1832.  
  1833. rtgmaster.library/WaitRtgSwitch                               rtgmaster.library/WaitRtgSwitch
  1834.  
  1835.    NAME
  1836.         WaitRtgSwitch - Waits on Doublebuffering having happened
  1837.  
  1838.    SYNOPSIS
  1839.         WaitRtgSwitch(RtgScreen)
  1840.                     A0
  1841.  
  1842.         WaitRtgSwitch(struct RtgScreen *)
  1843.  
  1844.    FUNCTION
  1845.         As SwitchScreens does not wait till the Doublebuffering has happened,
  1846.         but returns AT ONCE, it might be that the program wants to access the
  1847.         video memory BEFORE the change has happened. In this case you can use
  1848.         WaitRtgSwitch to be sure the change really happened. If you do not
  1849.         want to wait, simply do not use this call :)
  1850.  
  1851.         Does not do much for some sublibraries. Some always wait...
  1852.  
  1853.    INPUTS
  1854.         The Screenhandle of the Screen, where the Wait should happen...
  1855.  
  1856.    SEE ALSO
  1857.         SwitchScreens()
  1858.  
  1859.  
  1860.  
  1861.  
  1862. rtgmaster.library/WriteRtgPixel                               rtgmaster.library/WriteRtgPixel
  1863.  
  1864.    NAME
  1865.         WriteRtgPixel - plots a single pixel to a RtgScreen
  1866.  
  1867.    SYNOPSIS
  1868.         WriteRtgPixel(RtgScreen, BufferAdr, XPos, YPos, Color)
  1869.                        A0         A1         D0    D1    D2
  1870.  
  1871.         WriteRtgPixel(struct RtgScreen *, APTR, ULONG, ULONG, UBYTE)
  1872.  
  1873.    FUNCTION
  1874.         Draws a single pixel at the specified position on a RtgScreen.
  1875.         The BufferAdr is the starting address of the buffer the users wants
  1876.         to draw the pixel in.  The user has obtained this address using
  1877.         LockRtgScreen() and GetBufAdr().  The BufferAdr is needed to specify
  1878.         the correct buffer for screens which are double or triple buffered.
  1879.  
  1880.         This function should only work for Palette mapped modes, Color is
  1881.         the Color number of the palette.
  1882.  
  1883.         THIS FUNCTION IS IMPLEMENTED WITH SUBLIBRARIES STARTING WITH VERSION 1.8
  1884.  
  1885.         DO NOT USE FOR SPEED RELEVANT STUFF. THIS FUNCTION MAY HAVE
  1886.         SOME OVERHEAD. FOR FAST OPERATIONS USE COPYRTGPIXELARRAY OR
  1887.         DO THE STUFF YOURSELVES.
  1888.  
  1889.    INPUTS
  1890.         RtgScreen - A handle for a valid screen previously opened by
  1891.                     this sublibrary's OpenRtgScreen() function.
  1892.         BufferAdr - The address of the memory containing the actual
  1893.                     screen graphics
  1894.         XPos - X position of the pixel the user wants to plot
  1895.         YPos - Y position of the pixel the user wants to plot
  1896.         Color - Color number
  1897.  
  1898.    SEE ALSO
  1899.         OpenRtgScreen(), WriteRtgPixelRGB(), WriteRtgPixelArray()
  1900.  
  1901.  
  1902.  
  1903. rtgmaster.library/WriteRtgPixelArray                     rtgmaster.library/WriteRtgPixelArray
  1904.  
  1905.    NAME
  1906.         WriteRtgPixelArray - writes an array of pixels to a RtgScreen
  1907.  
  1908.    SYNOPSIS
  1909.         WriteRtgPixelArray(RtgScreen, BufferAdr, Array, Left, Top, Width, Height)
  1910.                             A0         A1         A2     D0    D1   D2     D3
  1911.  
  1912.         WriteRtgPixelArray(struct RtgScreen *, APTR, APTR, ULONG, ULONG,
  1913.                            ULONG, ULONG)
  1914.  
  1915.    FUNCTION
  1916.         Draws an rectangular array of pixels to the specified position on a
  1917.         RtgScreen.  The BufferAdr is the starting address of the buffer the
  1918.         user wants to draw this array of pixels in.  The user has obtained
  1919.         this address using LockRtgScreen() and GetBufAdr().  The BufferAdr is
  1920.         needed to specify the correct buffer for screens which are double or
  1921.         triple buffered.
  1922.  
  1923.         This function should only work for Palette mapped modes.  The array
  1924.         consists of one byte per pixel, each byte specifying a Color number.
  1925.  
  1926.         This function is many times faster than writing each pixel seperately
  1927.         to the screen using WriteRtgPixel().
  1928.  
  1929.         Note: For compatibility with rtgAMI.library,
  1930.         Array should contain at least ((((width+15)>>4)<<4)*Height Bytes.
  1931.  
  1932.         THIS FUNCTION IS IMPLEMENTED WITH SUBLIBRARIES STARTING WITH VERSION 1.8
  1933.  
  1934.         DO NOT USE FOR SPEED RELEVANT STUFF. THIS FUNCTION MAY HAVE
  1935.         SOME OVERHEAD. FOR FAST OPERATIONS USE COPYRTGPIXELARRAY OR
  1936.         DO THE STUFF YOURSELVES.
  1937.  
  1938.    INPUTS
  1939.         RtgScreen - A handle for a valid screen previously opened by
  1940.                     this sublibrary's OpenRtgScreen() function.
  1941.         BufferAdr - The address of the memory containing the actual
  1942.                     screen graphics
  1943.         Array - Pointer to an array of pixels which is Width pixels wide, 
  1944.                 and Height pixels high.  Each pixel is one byte in size.
  1945.         Left - X position of the top-left of the rectangular pixel array
  1946.         Top - Y position of the top-left of the rectangular pixel array
  1947.         Width - Width of the array in pixels
  1948.         Height - Height of the array in pixels
  1949.  
  1950.    SEE ALSO
  1951.         OpenRtgScreen(), WriteRtgPixel(), WriteRtgPixelRGBArray()
  1952.  
  1953.  
  1954.  
  1955. rtgmaster.library/WriteRtgPixelRGB                         rtgmaster.library/WriteRtgPixelRGB
  1956.  
  1957.    NAME
  1958.         WriteRtgPixelRGB - plots a single pixel to a RtgScreen
  1959.  
  1960.    SYNOPSIS
  1961.         WriteRtgPixelRGB(RtgScreen, BufferAdr, XPos, YPos, Color)
  1962.                           A0         A1         D0    D1    D2
  1963.  
  1964.         WriteRtgPixelRGB(struct RtgScreen *, APTR, ULONG, ULONG, ULONG)
  1965.  
  1966.    FUNCTION
  1967.         Draws a single pixel at the specified position on a RtgScreen.
  1968.         The BufferAdr is the starting address of the buffer the users wants
  1969.         to draw the pixel in.  The user has obtained this address using
  1970.         LockRtgScreen() and GetBufAdr().  The BufferAdr is needed to specify
  1971.         the correct buffer for screens which are double or triple buffered.
  1972.  
  1973.         This function should only work for True Color modes, Color is
  1974.         a 32 bit value which specifies what Color the pixel should be.
  1975.         The layout of this 32-bit value is as follows:
  1976.  
  1977.         %aaaaaaaa.rrrrrrrr.gggggggg.bbbbbbbb        
  1978.  
  1979.         a = AlphaChannel (8-bits) which may or may not be ignored.  The
  1980.             user will set this to zero if the user doesn't want to use
  1981.             AlphaChannel.
  1982.         r = Red component (8-bits) of the 24-bit RGB value
  1983.         g = Green component (8-bits) of the 24-bit RGB value
  1984.         b = Blue component (8-bits) of the 24-bit RGB value
  1985.  
  1986.         THIS FUNCTION IS IMPLEMENTED WITH SUBLIBRARIES STARTING WITH VERSION 1.8
  1987.  
  1988.         DO NOT USE FOR SPEED RELEVANT STUFF. THIS FUNCTION MAY HAVE
  1989.         SOME OVERHEAD. FOR FAST OPERATIONS USE COPYRTGPIXELARRAY OR
  1990.         DO THE STUFF YOURSELVES.
  1991.  
  1992.    INPUTS
  1993.         RtgScreen - A handle for a valid screen previously opened by
  1994.                     this sublibrary's OpenRtgScreen() function.
  1995.         BufferAdr - The address of the memory containing the actual
  1996.                     screen graphics
  1997.         XPos - X position of the pixel the user wants to plot
  1998.         YPos - Y position of the pixel the user wants to plot
  1999.         Color - A 32-bit value describing the color (see above)
  2000.  
  2001.    SEE ALSO
  2002.         OpenRtgScreen(), WriteRtgPixel(), WriteRtgPixelRGBArray()
  2003.  
  2004.  
  2005.  
  2006. rtgmaster.library/WriteRtgPixelRGBArray               rtgmaster.library/WriteRtgPixelRGBArray
  2007.  
  2008.    NAME
  2009.         WriteRtgPixelRGBArray - writes an array of pixels to a RtgScreen
  2010.  
  2011.    SYNOPSIS
  2012.         WriteRtgPixelRGBArray(RtgScreen, BufferAdr, Array, Left, Top, Width, Height)
  2013.                                A0         A1         A2     D0    D1   D2     D3    
  2014.  
  2015.         WriteRtgPixelRGBArray(struct RtgScreen *, APTR, APTR, ULONG, ULONG,
  2016.                               ULONG, ULONG)
  2017.  
  2018.    FUNCTION
  2019.         Draws an rectangular array of pixels to the specified position on a
  2020.         RtgScreen.  The BufferAdr is the starting address of the buffer the
  2021.         user wants to draw this array of pixels in.  The user has obtained
  2022.         this address using LockRtgScreen() and GetBufAdr().  The BufferAdr is
  2023.         needed to specify the correct buffer for screens which are double or
  2024.         triple buffered.
  2025.  
  2026.         This function should only work for True Color modes.  The array
  2027.         consists of one longword (32-bits) per pixel, each longword specifies
  2028.         a Color in this format:
  2029.  
  2030.         %aaaaaaaa.rrrrrrrr.gggggggg.bbbbbbbb        
  2031.  
  2032.         a = AlphaChannel (8-bits) which may or may not be ignored.  The
  2033.             user will set this to zero if the user doesn't want to use
  2034.             AlphaChannel.
  2035.         r = Red component (8-bits) of the 24-bit RGB value
  2036.         g = Green component (8-bits) of the 24-bit RGB value
  2037.         b = Blue component (8-bits) of the 24-bit RGB value
  2038.  
  2039.         This function is many times faster than writing each pixel seperately
  2040.         to the screen using WriteRtgPixelRGB().
  2041.  
  2042.         THIS FUNCTION IS IMPLEMENTED WITH SUBLIBRARIES STARTING WITH VERSION 1.8
  2043.  
  2044.         DO NOT USE FOR SPEED RELEVANT STUFF. THIS FUNCTION MAY HAVE
  2045.         SOME OVERHEAD. FOR FAST OPERATIONS USE COPYRTGPIXELARRAY OR
  2046.         DO THE STUFF YOURSELVES.
  2047.  
  2048.    INPUTS
  2049.         RtgScreen - A handle for a valid screen previously opened by
  2050.                     this sublibrary's OpenRtgScreen() function.
  2051.         BufferAdr - The address of the memory containing the actual
  2052.                     screen graphics
  2053.         Array - Pointer to an array of pixels which is Width pixels wide, 
  2054.                 and Height pixels high.  Each pixel is one longword (32-bits)
  2055.                 in size.
  2056.         Left - X position of the top-left of the rectangular pixel array
  2057.         Top - Y position of the top-left of the rectangular pixel array
  2058.         Width - Width of the array in pixels
  2059.         Height - Height of the array in pixels
  2060.  
  2061.    SEE ALSO
  2062.         OpenRtgScreen(), WriteRtgPixelRGB(), WriteRtgPixelArray()
  2063.